# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-sqlitedict
pkgver=2.1.0
pkgrel=2
pkgdesc="Persistent dict in Python, backed up by sqlite3 and pickle, multithread-safe"
url="https://github.com/RaRe-Technologies/sqlitedict"
license=('Apache')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-nose')
source=("$pkgname-$pkgver.tar.gz::https://github.com/RaRe-Technologies/sqlitedict/archive/v$pkgver.tar.gz")
sha512sums=('93f4c539c53f92bc320ff654b08f2f24eea886ab28a31ff211094f744674e08bd79e2c3fc3e1489e663030e49bf2aa8cf70d7e030293f830cfb5db08b6bd2853')

build() {
  cd sqlitedict-$pkgver
  python setup.py build
}

check() {
  cd sqlitedict-$pkgver
  mkdir -p tests/db
  nosetests3
}

package() {
  cd sqlitedict-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
